package com.itheima.stock.api;

import com.itheima.stock.entity.StockBusiness;
import com.itheima.stock.response.PageResult;
import com.itheima.stock.response.ResponseResult;
import com.itheima.stock.vo.*;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.io.IOException;
import java.util.List;

@RequestMapping(path = "/api/quot")
public interface StockControllerAPI {

    @GetMapping
    ResponseResult stockUpdown();

    @GetMapping("/stock/tradevol")
    public ResponseResult<TradevolVO<OptionVo>> tradeAmt();

    @GetMapping("/stock/export")
    public ResponseResult<FileDownloadVO> export(@RequestParam("page") int page,@RequestParam("pageSize") int pageSize,@Autowired HttpServletResponse response) throws IOException;

    @GetMapping("/stock/updown/count")
    ResponseResult<UpDownVO<OptionVo>> upDown();

    @GetMapping(path = "/stock/all")
    ResponseResult<PageResult<MoreVO>> more(@RequestParam("page") Integer page, @RequestParam("pageSize") Integer pageSize);

    @GetMapping(path = "/stock/increase")
    ResponseResult<List<IncreaseVO>> stockInCrease();

    @GetMapping(path = "/sector/all")
    ResponseResult<List<StockBlockInfoVO>> stockControllerApi();

    @GetMapping(path = "/index/all")
    ResponseResult<List<MarketIndexVO>> innerIndexAll();

    @GetMapping(path="stock/business/all")
    ResponseResult<List<StockBusiness>> getStockBusiness();
}
